package com.lavegue.service.impl;

import java.util.List;

import com.lavegue.common.BaseService;
import com.lavegue.common.Page;
import com.lavegue.dao.BisTypeDao;
import com.lavegue.dao.CompanyDao;
import com.lavegue.model.BisType;
import com.lavegue.model.Company;
import com.lavegue.service.CompanyService;

public class CompanyServiceImpl extends BaseService<Company, Integer, CompanyDao> implements CompanyService{

	private CompanyDao companyDao;
	
	public CompanyDao getCompanyDao() {
		return companyDao;
	}

	public void setCompanyDao(CompanyDao companyDao) {
		this.companyDao = companyDao;
	}

	/**
	 * 查询所有公司
	 * @return
	 */
	public List<Company> findByCompany() {
		List<Company> comList = companyDao.findByCompany();
		return comList;
	}
	/**
	 * 根据公司名称或者ID查询
	 * @return
	 */
	public Company findCompanyByName(String companyName,Integer companyId){
		return  companyDao.findCompanyByName(companyName,companyId);
	}
	//根据公司名称查询
	 public Page<Company> getAllCompanyByName(int pageNo,int pageSize,String name)
	 {
		 return this.getDao().getAllCompanyByName(pageNo, pageSize, name);
	 }
	

}
